﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ScenarioFramework.WAPI.Exception
{
    public class WAPIException : System.Exception
    {
        int iCode;

        public WAPIException()
        {
        }

        public WAPIException(ScenarioFramework.WAPI.Response response)
            : base(response.sMsg)
        {
            this.iCode = response.iCode;
        }

        public WAPIException(int code, string message)
            : base(message)
        {
            this.Code = code;
        }

        public WAPIException(int code)
            : base("Generic Error")
        {
            this.Code = code;
        }

        public int Code
        {
            get { return this.iCode; }
            set { this.iCode = value; }
        }

        
    }
}
